package com.example.viewdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
    private Button btn_taiji,btn_checkerboard;
    private View view;
    private TaiJiView taiJiView;
    checkerboardView checkerboardview;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }
    public void initView(){
        btn_taiji=findViewById(R.id.btn_taiji);
        btn_checkerboard=findViewById(R.id.btn_checkerboard);
//        view=findViewById(R.id.mview);
//        taiJiView=new TaiJiView(getApplicationContext());
        //view = findViewById(R.id.mtaijiview);
        btn_taiji.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getApplicationContext(),"点击了",Toast.LENGTH_SHORT).show();
                taiJiView.createAnimation();
            }
        });
        btn_checkerboard.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    }
    
}
